home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / gpp-1_42.lha / g++-1.42.0 / README < prev    next >
Text File  |  1992-09-20  |  12KB  |  288 lines

  1. This is the file README.  It documents release 1.42.0 of the GNU C++
  2. compiler system, still in test release status.  This is actually the
  3. same as 1.41.0--the same C++ files should work with GCC 1.42 as
  4. worked with 1.41.  There is not much work being done any longer
  5. on C++ version 1.
  6.  
  7. To see the list of current issues/bugs in GNU C++, look at the file
  8. dist-g++/ideas, or see the BugList section of the GNU C++ Users
  9. Guide.
  10.  
  11. See the file HINTS for special clues relating to GNU C++ configuration
  12. and troubleshooting.
  13.  
  14. Introduction.
  15.  
  16. GNU C++ is GNU CC, with a C++ front end.  GNU CC is the Free Software
  17. Foundation's optimizing, retargetable, ANSI C compiler.  GNU CC has
  18. source level debugging support from the GDB debugger (also available
  19. from the Free Software Foundation).  For more information about GNU
  20. CC, write to the Free Software Foundation at the address given below.
  21. GNU C++ is an extension of GNU CC.  It keeps the powerful optimizer,
  22. and maintains a high degree of source-level debugging support, while
  23. providing the object-oriented features of C++.  Numerous files have
  24. been added, changed, and hacked without mercy from their original GNU
  25. CC incarnation to make this compiler accept a reasonable super/subset
  26. of C++.
  27.  
  28. *Disclaimer*: GNU C++ is not perfectly compatible with AT&T
  29. C++.  It is, however, a reasonably faithful implementation of C++ as
  30. described in the C++ reference manual.  To make GNU C++ more mobile,
  31. only the files that are not shared with GNU CC are currently being
  32. distributed.  If you do not have GNU CC yet, or your version is older
  33. than 1.42, you should take care of getting that first.  GNU CC is
  34. available to sites which have anonymous ftp capability to
  35. prep.ai.mit.edu.  Contact the Free Software Foundation for more
  36. information.
  37.  
  38. GNU C++ is still under development, but has stabilized (hopefully) to
  39. the point where bug fixes will not require major implementation or
  40. reimplementation.  The purpose of this distribution is to give
  41. interested parties a chance to start working with a free C++ compiler.
  42. It is expected (and hoped) that this compiler will continue to evolve
  43. at a fairly rapid pace.  I am hoping to receive not just bug reports,
  44. but also code contributions, new features, and anything else that
  45. makes GNU C++ a better compiler.
  46.  
  47. Documentation for GNU C++ does not really exist.  If you would like to
  48. write some, more power to you.  What does exist is in the file
  49. dist-g++/g++.texinfo .
  50.  
  51. GNU C++ is no longer distributed with a special debugger.  The current
  52. version of GDB needed to debug GNU C++ program is version 3.5, which
  53. can be gotten from prep.ai.mit.edu in the usual way.
  54.  
  55. Currently, the debugger supports all of the features of the compiler,
  56. except for: new and delete, operator forms of new and delete, user
  57. defined type conversion, and multiple inheritance when multiple
  58. inheritance must actually be used.  The reason for these exceptions is
  59. the degree of difficulty of their implementation.  I am waiting until
  60. I see a clean, general way of doing it.  Until then, I would
  61. appreciate any input (thoughts, caveats, source code) you would like
  62. to provide.
  63.  
  64. A name demangler has been provided by James Clark.  Here is the text
  65. from his README file:
  66.  
  67.     This package contains a demangler for GNU C++ version 1.41.0
  68.     (July 13, 1992 version); it will probably require work for other
  69.     versions.
  70.  
  71.     It has *not* been extensively tested, so use with caution.
  72.  
  73.     Demangling converts an encoded g++ symbol name approximately into
  74.     the form of a C++ declaration.
  75.  
  76.     cplus-dem.c provides a self-contained implementation of the
  77.     demangling function cplus_demangle.
  78.  
  79.     g++filt.c is a simple filter that illustrates the use of
  80.     cplus_demangle.  It has a similar function to the c++filt program
  81.     provided for cfront 2.0.  It filters its input replacing encoded
  82.     g++ symbol names by their demangled equivalents. Anything not part
  83.     of a g++ symbol name is passed through unchanged. It can be used
  84.     to filter the output of, for example, gprof or nm.
  85.  
  86.     ld.c.patch contains a rather ugly patch to ld.c (the version which
  87.     comes with g++) to make it use cplus_demangle for printing the
  88.     names of undefined symbols when a -lg++ option is given.
  89.  
  90.     James Clark
  91.     jjc@jclark.uucp
  92.  
  93. GNU C++ was originally developed on a Sun-3 workstation, running Sun's
  94. OS 3.5, and was migrated to a Sun-4 workstation, running Sun's OS 4.0
  95. (Berkeley 4.2 compatible with some System V enhancements).  The GNU
  96. C++ library was developed on a VAX 11/750 running BSD 4.3, and is now
  97. being developed on a Sun-4 workstation as well.  If you have machines
  98. other than these, or any kind of machine running System V, you may
  99. experience installation difficulties due to conditions which I cannot
  100. anticipate.  I will try to help you with problems on these machines,
  101. but my primary goal is supporting GNU C++, and not System V (or VMS).
  102.  
  103. Installation of GNU C++. (From distribution tape)
  104.  
  105. Select the directory in your file system where GNU code usually goes.
  106. If this is your first GNU code, then you have probably not installed
  107. GNU CC.  Please install it, and then continue with these instructions.
  108. You also need to have bison installed.  In this directory, you should
  109. have the subdirectories
  110.  
  111.     gcc-1.42/
  112.     gcc/    linked to ->    gcc-1.42
  113.     gcc-test/
  114.  
  115. and possibly others.  Unload the tape by using the tar command.
  116.  
  117.     install% tar xvf TARFILE
  118.  
  119. where TARFILE is either the name of a tar file if you got the
  120. distribution via ftp, or is the name of the tape device on which the
  121. release tape is held.
  122.  
  123. Your directory tree should now contain the additional file
  124.  
  125.     g++-1.42.0/
  126.  
  127. If you got this tar file electronically instead of by tape, these
  128. directories will come from separate tar files.
  129.  
  130. The GNU C++ library contains header files such as `stdio.h',
  131. `stream.h', etc., which are useful when trying examples from the book.
  132. It also contains a number of useful classes which serve both as
  133. function program units, as well as example C++ code.  This version of
  134. the GNU C++ compiler should be compatible with libg++-1.39.0 and later
  135. "series 1" libraries.  For libg++ version 2, you must use GNU C++
  136. version 2.2.2 or later.
  137.  
  138. The code for GNU C++ is in the directory g++-1.42.0/.  Here is how to
  139. install GNU C++:
  140.  
  141. (0) Installation of GNU C++ assumes that you will share binaries
  142.     with GNU CC.  If this is not the case, then run "make cleanconfig"
  143.     after running "make maketest".
  144.  
  145. (1) Make a directory, e.g. g++/ and `cd' into it
  146.  
  147.     install% mkdir g++
  148.     install% cd g++
  149.  
  150. (2) Make symbolic links from all files in the g++-1.42.0 directory
  151.     to the current g++ directory, i.e., ln -s ../g++-1.42.0/* .
  152.  
  153. (3) Read carefully the comments at the top of the Makefile, to see
  154.     what flags, you will need to modify, if any.  For example, if you
  155.     have a System V machine, you may have to uncomment the line which
  156.     defines USG_STDIO.
  157.  
  158. (4) Do a `make' of the "maketest" target in the Makefile.  If your
  159.     directory structure is as described here, you need not give any
  160.     additional arguments.  Otherwise, you must set DIR to the
  161.     directory which contains GNU CC sources, and TDIR to the directory
  162.     which contains GNU CC object files.  The variable CDIR is the
  163.     directory for GNU CC's machine-specific files.  You do not need to
  164.     explicitly give this a value unless you have moved GNU CC's
  165.     "config" directory relative to the DIR director.
  166.  
  167. The error messages about links that could not be made should be
  168. ignored.
  169.  
  170. (5) Configure the compiler for the machine target you want.  This is
  171.     accomplished by running the program "config.g++".  For example, on
  172.     a Sun4 running SunOS 4.0, you would type:
  173.  
  174.     install% config.g++ sun4-os4
  175.  
  176. Now, You should still be in the directory g++/:
  177.  
  178.     install% pwd
  179.     ./g++
  180.     install% 
  181.  
  182. If GAS and GNU LD work for your machine, *use them*.  That will permit
  183. you to use the system's crt0.o, including mcrt0.o and gcrt0.o which
  184. support profiling and other features.  Said another way, if you use
  185. GNU ld and GNU as, don't use special crt0.o!
  186.  
  187. To install GAS, you should have release 1.34 or greater.  Since GAS
  188. and GNU C/C++ do not share source code, there is no need to try to
  189. match GAS and GNU C/C++ version numbers.  To install GAS in such a way
  190. that GNU C/C++ can find it, install it as `gcc-as' wherever `gcc-cc1'
  191. and `gcc-cc1plus' are installed.  Usually this is
  192. `/usr/local/lib/gcc-as'.  Similarly install GNU LD as `gcc-ld' where
  193. `gcc-cc1' and friends are installed, usually `/usr/local/lib/gcc-ld'.
  194.  
  195. GNU LD will not work if your system uses COFF object files.  In
  196. this case, use the `collect3' program.
  197.  
  198. [If neither GNU LD or `collect' works, use collect2.c.  (In
  199. particular, use it on Convex machines.)  To use collect2.c, your
  200. system must support the -r flag of ld.  Edit collect2.c if
  201. necessary to tell it about your assembler syntax, then compile it
  202. with gcc and install it as /usr/local/lib/gcc-ld.]
  203.  
  204. *Very Important* [For non-GAS users]: If you do not use GAS, GNU C++
  205. may need to use its own crt0.c, borrowed and modified from GNU Emacs.
  206. You should verify that the crt0.c provided is fed suitable definitions
  207. for correct compilation.  If you have GNU Emacs, and you are not
  208. compiling to a SUN, consult your local GNU Emacs guru, to see what
  209. sort of #defines are required for proper operation.
  210.  
  211. In any event, at this point, just type `make':
  212.  
  213.     install% make
  214.  
  215. If you are not using a SUN, you will need to use the appropriate
  216. machine dependent files, as per GNU CC.  If you do not provide a
  217. proper crt0.c, any executable produced by GNU C++ may fail to run at
  218. all.  Conversely, if you have a program which does not make it as far
  219. as the first line in main (), you have probably failed to provide the
  220. correct flags to the compiler when building crt0.c.
  221.  
  222. You have now just made GNU C++.  Having done that, you should now
  223. proceed to use GNU C++ to build the GNU C++ run-time libraries, which
  224. are in the directory dist-libg++/ .  This code was contributed
  225. by Doug Lea, and implements streams, obstacks, structured files, and
  226. other C++ public service objects.  The README in that directory
  227. explains the installation procedure for that code.  Also, by making
  228. the library and running the test programs (the Makefile in
  229. dist-libg++/ will tell you what to do), you can verify that GNU
  230. C++ has been properly installed.
  231.  
  232. GNU ld is normally distributed with the GNU binary utilities.  It is
  233. preferable to use that for linking GNU C++ programs.  However, it is
  234. possible to link GNU C++ programs using the version of GNU ld
  235. distributed with GNU C++ (this has been tested under SunOS 4.0 and
  236. under SunOS 4.1.1).  To install GNU ld from these sources, execute the
  237. following command:
  238.  
  239.     install% make install-ld
  240.  
  241. Installation of GDB.
  242.  
  243. GNU C++ and GDB 3.4 are intended to be compatible.  GDB+ no longer
  244. exists.  Read installation instructions provided in dist-gdb.
  245.  
  246. Suggestions.
  247.  
  248. I suggest making all of the files in ../gcc/ read-only, so that when
  249. you are making modifications to files of GNU C++, you will notice when
  250. new ground is being broken.  It also helps to know what files can be
  251. updated from the standard GNU software without impacting GNU C++.  For
  252. example, if there is a bug fix for the file `cse.c', that same fix
  253. applies to GNU CC and GNU C++.  With both compilers pointing to the
  254. same directory via symbolic links, one need not concern oneself
  255. with those changes.
  256.  
  257. Have fun!
  258.  
  259. Michael Tiemann
  260.  
  261. 1/11/91
  262.  
  263. For more information.
  264.  
  265. For questions concerning GNU CC and GDB, the Free Software Foundation
  266. maintains the following address:
  267.  
  268.     The Free Software Foundation
  269.     675 Massachusetts Avenue
  270.     Cambridge, Mass
  271.     02139
  272.  
  273.     Phone: (617) 876 - 3296
  274.  
  275. Cygnus Support provides commercial support for GNU C++ on a fixed-fee
  276. basis.  If you want support, or have support-related questions, please
  277. contact:
  278.  
  279.     Cygnus Support
  280.     814 University Avenue
  281.     Palo Alto, CA
  282.     94301
  283.  
  284.     Phone: (415) 322-3811
  285.  
  286. Software from the Free Software Foundation is provided with absolutely
  287. no warranty, to the extent permitted by applicable state law.
  288.